#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
    int n;
    scanf("%d", &n);
    for (int i = 1; i < n + 1; i++)
    {
        int a = i;
        int b = n;
        for (int j = 1; j < n - i+2; j++)
        {
            printf("%-4d",a);
            a += b;
            b -= 1;
        }
        printf("\n");
    }
	return 0;
}